package com.fesine.jms.consumer;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

/**
 * @description: 消息接受监听者
 * @author: Fesine
 * @createTime:2017/9/3 15:50
 * @update:修改内容
 * @author: Fesine
 * @updateTime:2017/9/3 15:50
 */
public class ConsumerMessageListener implements MessageListener {
    @Override
    public void onMessage(Message message) {
        TextMessage text = (TextMessage) message;
        try {
            System.out.println("接受消息:"+text.getText());
        } catch (JMSException e) {
            e.printStackTrace();
        }
    }
}
